<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>伪类选择器</title>
		<style>
			.triangle{
				width: 500px;
				display: flex;
				flex-direction: column;
				align-items: center;
			}
			.triangle div{
				height: 50px;
				margin: 5px;
				display: flex;
				justify-content: space-between;
			}
			.triangle div span{
				width: 50px;
				height: 50px;
				border-radius: 50%;
				background-color: lightgreen;
			}
			.triangle div span:first-child, 
			.triangle div span:last-child{background-color: lightcoral;}
		</style>
	</head>
	<body>
		<figure class="triangle">
			<div>
				<span></span>
			</div>
			<div>
				<span></span>
				<span></span>
			</div>
			<div>
				<span></span>
				<span></span>
				<span></span>
			</div>
			<div>
				<span></span>
				<span></span>
				<span></span>
				<span></span>
			</div>
			<div>
				<span></span>
				<span></span>
				<span></span>
				<span></span>
				<span></span>
			</div>
			<div>
				<span></span>
				<span></span>
				<span></span>
				<span></span>
				<span></span>
				<span></span>
			</div>
		</figure>
	</body>
</html>
